<#escape x as x?html>
<div class="main">
    <div class="row">
        <div class="col-lg-12 col-md-12">
            <div class="pull-right">
                <div class="input-group input-group-sm" style="float: left; width: 200px">
                    <input type="text" class="form-control" style="height: 34px" ng-model="query"
                           ng-keyup="queryService($event.keyCode)"
                           placeholder="搜索...">
                    <span class="glyphicon glyphicon-search form-control-feedback text-muted"></span>
                </div>
                <div class="input-group-btn bg-default no-border" style="margin-left: 10px; float: left">
                    <a href="#" class="btn btn-primary" ng-click="loginFusion()">申请服务</a>
                </div>
            </div>
        </div>
        <div class="col-lg-12 col-md-12">
            <table class="table table-detail">
                <thead>
                <th>
                    名称
                </th>
                <th>
                    描述
                </th>
                <th>
                    申请时间
                </th>
                <th>
                    过期时间
                </th>
                </thead>
                <tbody>
                <tr ng-repeat="ser in services | filter: query">
                    <td><span><a href="#" ng-click="jumpToService(ser.id)">{{ser.name}}</a></span></td>
                    <td><span>{{ser.description}}</span></td>
                    <td><span>{{ser.applyDate}}</span></td>
                    <td><span>{{ser.endDate}}({{ser.dayLeft}}天)</span></td>
                </tr>
                </tbody>
            </table>
        </div>
    </div>
</div>
<script>
    var config = {
        paths: {
            service: "${modulesPath}/service/service",
        }
    };

    context.call(config, ["service"], function (service) {
        service.init();
    })
</script>
</#escape>
